package com.xxgc.eow.service.impl;

import com.github.pagehelper.PageHelper;
import com.xxgc.eow.entity.Industrytype;
import com.xxgc.eow.mapper.FinancingMapper;
import com.xxgc.eow.mapper.IndustrytypeMapper;
import com.xxgc.eow.service.IIndustrytypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 行业类型 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-21
 */
@Service
public class IndustrytypeServiceImpl extends ServiceImpl<IndustrytypeMapper, Industrytype> implements IIndustrytypeService {

    @Resource
    private IndustrytypeMapper industrytypeMapper;
    @Override
    public List<Industrytype> getBykeyWord(int pageNum , int pageSize,String keyWord) {
        PageHelper.startPage(pageNum,pageSize);
        return industrytypeMapper.selectBykeyWord(keyWord);
    }

    @Override
    public int delIndustry(Industrytype industrytype) {
        return industrytypeMapper.deleteByPrimaryKey(industrytype);
    }

    @Override
    public List<Industrytype> getAllPage(String keyWord) {
        return industrytypeMapper.selectBykeyWord(keyWord);
    }
}
